import { tplReplace } from "../../utils/tools";
import navItem from './navItem.tpl'
import nav from "./nav.tpl";
import './nav.scss'
export default {
    title:'导航',
    



    tpl(data){
        var itemlist=''
        data.map((item,index)=>{
           itemlist+= tplReplace(navItem,{
               isCurrent:!index?'current':'',
               type:item.type,
               title:item.title
           })
        })
        console.log(itemlist)
        return tplReplace(nav,{
            itemList:itemlist,
            wrapperW: .6 * data.length
        })
    }

}